name := "id-mapping-core"
organization := "com.zz"
version := "0.1.0"

val akkaV         = "2.5.26"
val akkaHttpV     = "10.1.11"
val akkaHttpJsonV = "1.29.1"
val alpAkkaKafkaV = "1.1.0"
val slickV        = "3.3.2"
val catsV         = "2.0.0"
val circeV        = "0.12.2"
val prometheusV   = "0.7.0"
val http4sV       = "0.21.1"
val doobieV       = "0.8.8"
val tsecV         = "0.2.0-M2"
val nettyV        = "4.1.38.Final"
val quillV        = "3.4.11-M1"
val pulsar4sV     = "2.4.4"
val monixV        = "3.1.0"

libraryDependencies ++= Seq(
    "com.typesafe.akka"          %% "akka-slf4j"              % akkaV
  , "com.typesafe.akka"          %% "akka-actor"              % akkaV
  , "com.typesafe.akka"          %% "akka-stream"             % akkaV
  , "com.typesafe.akka"          %% "akka-cluster"            % akkaV
  , "com.typesafe.akka"          %% "akka-cluster-tools"      % akkaV
  , "com.typesafe.akka"          %% "akka-cluster-metrics"    % akkaV
  , "com.typesafe.akka"          %% "akka-http-core"          % akkaHttpV
  , "com.typesafe.akka"          %% "akka-http"               % akkaHttpV
  , "com.typesafe.akka"          %% "akka-stream-kafka"       % alpAkkaKafkaV
  , "io.prometheus"              % "simpleclient"             % prometheusV
  , "io.prometheus"              % "simpleclient_hotspot"     % prometheusV
  , "io.prometheus"              % "simpleclient_common"      % prometheusV
  , "io.prometheus"              % "simpleclient_pushgateway" % prometheusV
  , "ch.qos.logback"             % "logback-classic"          % "1.2.3"
  , "org.slf4j"                  % "log4j-over-slf4j"         % "1.7.25"
  , "com.typesafe.slick"         %% "slick"                   % slickV
  , "com.typesafe.slick"         %% "slick-hikaricp"          % slickV
  , "org.typelevel"              %% "cats-core"               % catsV
  , "org.typelevel"              %% "cats-free"               % catsV
  , "org.typelevel"              %% "cats-effect"             % catsV
  , "org.http4s"                 %% "http4s-blaze-server"     % http4sV
  , "org.http4s"                 %% "http4s-blaze-client"     % http4sV
  , "org.http4s"                 %% "http4s-circe"            % http4sV
  , "org.http4s"                 %% "http4s-dsl"              % http4sV
  , "org.http4s"                 %% "http4s-twirl"            % http4sV
  , "io.circe"                   %% "circe-core"              % circeV
  , "io.circe"                   %% "circe-generic"           % circeV
  , "io.circe"                   %% "circe-parser"            % circeV
  , "io.circe"                   %% "circe-generic-extras"    % circeV
  , "io.getquill"                %% "quill-cassandra"         % quillV
  , "com.typesafe.scala-logging" %% "scala-logging"           % "3.9.2"
  , "com.aerospike"              % "aerospike-client"         % "4.4.4"
  , "org.postgresql"             % "postgresql"               % "42.2.8"
  , "com.github.pureconfig"      %% "pureconfig"              % "0.12.1"
  , "org.scalatest"              %% "scalatest"               % "3.0.8" % "test"
  , "com.zz"                     %% "simple-aerospike-client" % "0.0.4"
  , "com.zz"                     %% "dsp-idl"                 % "0.2.15-M1"
  , "com.zz"                     %% "ady-idl"                 % "0.0.1-M10"
).map(
  _.excludeAll(
      ExclusionRule("org.log4j")
    , ExclusionRule("org.slf4j", "slf4j-simple")
  ))

addCommandAlias("validate", ";clean;protobuf:protobufGenerate;coverage;test;coverageReport")
addCommandAlias("benchmark", ";clean;bench/jmh:compile;bench/jmh:run")
addCommandAlias("package", ";universal:packageZipTarball")
addCommandAlias("stage", ";stage")
addCommandAlias("build", ";validate;coverageOff;package")
addCommandAlias("run", ";run")
addCommandAlias("pkg", ";universal:packageZipTarball")
addCommandAlias("clean", "clean;")

PB.targets in Compile := Seq(
    scalapb.gen() -> (sourceManaged in Compile).value
)

libraryDependencies += "com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf"
